<%--
  Created by IntelliJ IDEA.
  User: asus-pc
  Date: 2017/11/10 0010
  Time: 10:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>查询结果</title>
</head>
<body>
<h2 align="center">查询结果</h2>
    <div align="center">
        <c:if test="${empty list}">

               <h2 align="center">暂无信息!!</h2>

        </c:if>
        <c:if test="${not empty list}">
        <table align="center" width="800" border="1" cellpadding="0" cellspacing="1">

            <tr>
                <td>车次</td>
                <td>出发地</td>
                <td>目的地</td>
                <td>硬座票价</td>
            </tr>

            <c:forEach var="tr" items="${list}">
            <tr>
                <td>${tr.trainNum}</td>
                <td>${tr.startStation}</td>
                <td>${tr.endStation}</td>
                <td>${tr.sitePrice}</td>
            </tr>
            </c:forEach>
        </table>
        </c:if>
    </div>
</body>
</html>
